#include<iostream>
#include<string>
#include<cstring>
using namespace std;
int main(){
	string s1,s2,s3,s4;
	int n,m,k,a,b,c,d;
	cin >> s1 >> s2 >> n;
	for(int i = 0; i < n; i++){
		cin >> a >> b;
		s3 = s1.substr(a-1,b-a+1);
		cin >> c >> d;
		s4 = s2.substr(c-1,d-c+1);
		if(s3>s4)cout <<"erfusuer"<<endl;
		else if(s3<s4)cout << "yifusuyi"<<endl;
		else cout << "ovo"<<endl;
	} 
	return 0;
} 

